import { Navigate, useRoutes } from 'react-router-dom'
import Login from '../views/Login/index'
import Welcom from '../views/Welcome'
import Error403 from '@/views/403'
import Error404 from '@/views/404'
const router = [
  {
    path: '/',
    element: <Welcom></Welcom>
  },
  {
    path: '*',
    element: <Navigate to='404'></Navigate>
  },
  {
    path: '403',
    element: <Error403></Error403>
  },
  {
    path: '404',
    element: <Error404></Error404>
  },
  {
    path: '/login',
    element: <Login></Login>
  }
]

export default function Router() {
  return useRoutes(router)
}
// export default createBrowserRouter(router)
